#include <mesh.h>
Meshs are defined as having an inside (back face) and an outside (front face).
Public Member Functions |
|
SurfacePoint (void) | |
Void Constructor. |
|
SurfacePoint (Mesh *pMesh, unsigned int iVertexIndex, unsigned int iFaceIndex) | |
Constructor. |
|
Vector | WorldPosition (void) const |
Returns the position of the SurfacePoint in
world space. |
|
Vector | WorldNormal (void) const |
Returns the normal of the selected face in
world space. |
|
Vector | FaceCoordinates (void) const |
Returns a 2d vector indicating the position
of the selected point within its face. |
|
Vector | InterpolatedNormal (void) const |
Returns the normal at the selected point
interpolated from the surrounding Vertex normals in local space.
|
|
bool | Fill (const Mesh *pMesh, unsigned int iFaceIndex, const Vector &vStart, const Vector &vEnd, bool bTwoSide=false) |
Set the SurfacePoint values based
on a line in local space. |
|
Public Attributes |
|
Mesh * | m_pMesh |
the mesh that has been picked |
|
unsigned int | m_iFaceIndex |
the index of the face that has been picked
|
|
float | m_fRelativeRange |
position of a mesh-line intersection
relative to the line. Ranges from 0.0 (at the beginning of the
line) to 1.0 (at the end). |
|
Vector | m_vLocalPosition |
position of the point in local space
|
|
Vector | m_vLocalNormal |
the normal vector of the mesh at the picked
point, in local space |
|
bool | m_bSide |
if true, the backside of the face was
selected. (This is not supported; use at your own risk.) |
|
Vector | m_vFaceCoordinates |
|
Void Constructor. |
|
Constructor.
|
|
Returns the position of the SurfacePoint in world space. |
|
Returns the normal of the selected face in world space. |
|
Returns a 2d vector indicating the position of the selected point within its face. |
|
Returns the normal at the selected point interpolated from the surrounding Vertex normals in local space. |
|
Set the SurfacePoint values based on a line in local space. This method looks at the line defined by vStart and vEnd and sees if it intersects the specified mesh and face. If it does, the remainder of the SurfacePoint values are filled in. The line in local space might represent the vector defined by the user clicking a point on the screen.
|
|
the mesh that has been picked |
|
the index of the face that has been picked |
|
position of a mesh-line intersection relative to the line. Ranges from 0.0 (at the beginning of the line) to 1.0 (at the end). |
|
position of the point in local space |
|
the normal vector of the mesh at the picked point, in local space |
|
if true, the backside of the face was selected. (This is not supported; use at your own risk.) |
|